<%@ page import="java.util.ArrayList,models.*,com.opensymphony.xwork2.ActionContext"  %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Home Page</title>

<meta name="keywords" content="Basic look and feel" />

<meta name="description" content="this is the base template html and css" />

<link href="style.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="header_wrapper">

<div id="header">

<div id="site_title_section">

<div id="site_title">
	          Issue Suite
            </div>
      
<div id="salogon">
	            The Issue Tracker </div>
            
<div class="cleaner">&nbsp;</div>
        
</div>
            
<div id="login_section" align="right" class="text_font">
            
<s:form action="logout.action" method="post">
    <table align="right">
<tr></tr><tr></tr>
<tr></tr><tr></tr>
<tr></tr><tr></tr>
<tr></tr><tr></tr>
<tr></tr><tr></tr><tr></tr>
<tr>
<s:if test="%{#session.loggedin == 'admin' }">  
  <td >You are logged in as Admin </td><td></td><td></td><td></td><td></td><td></td>
  


 </s:if>  
<s:else>

<td >You are logged in as <s:property value="%{#session.Developer.uname}" /></td><td>!!</td> <td></td><td></td><td></td><td></td><td></td>


</s:else>

<td>
<div><s:submit name = "commandButton" value="Logout" 
          align="center" theme="simple" id="mylogin"  /></div>
</td>
<td></td>
</tr>
</table>
</s:form>
     
</div>    
    
</div> <!-- end of header -->
</div>
<!-- end of header wrapper -->


<div id="banner_wrapper">
    
<div id="banner">
    
        
<div id="banner_header_01">Welcome to Issue Suite</div>
        
<div id="banner_header_02">Make your software close to Perfection</div>
        
<div id="banner_text">
            
<p>You feel a strong need in the universal management tools that will help optimize your and your team's work in a couple of clicks? An issue tracking tool will be easy and pleasant to deal with. Then Issue Suite is exactly you need. Issue Suite is a user-friendly issue tracking system.</p>
            
<div class="rc_btn_01"><a href="<s:url value="/aboutUsPostLogin.jsp" />">Continue reading...</a></div>
        
</div>
    
</div>	
<!-- end of banner -->

</div> 
<!-- end of banner wrapper -->



<div id="menu_wrapper">    
    
<div id="menu">
        
<ul>
            
<li><a href="<s:url value="/postLogin.jsp" />" target="_parent"><span></span>Home</a></li>

<li><a href="<s:url value="/aboutUsPostLogin.jsp" />" target="_parent"><span></span>About Us</a></li>

<li><a href="<s:url value="/account.jsp" />"><span></span>Profile</a></li>
                       
<li><a href="#" class="current"><span></span>Search Ticket</a></li>
            

        
</ul>    	
    
</div> 
<!-- end of menu -->
</div> 
<!-- end of menu wrapper -->


<div id="content_wrapper" align="center">

<div id="content" align="center" class="text_font">
<fieldset class="boxBody">
<s:form action="search_issue.action" method= "post" >
<table>
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr>

<td align="center">
	<s:label theme="simple">By Category</s:label> 
</td>

<td>
	<s:select theme="simple" name= "byCategory" headerKey="-1" headerValue="----- Select ----" list = "#{'hardware issue':'hardware issue', 'quality issue':'quality issue', 'performance issue':'performance issue' , 'software issue':'software issue'}" label = "Category" id = "searchby" size = "1" />
</td><td></td><td></td><td></td><td></td>
<td align="center">
	<s:label theme="simple">By Status</s:label> 
</td>
<td>
	<s:select theme="simple" name= "byStatus" headerKey="-1" headerValue="----- Select ----" list = "#{'new':'new', 'assigned':'assigned', 'solved':'solved' }" label = "By Status" id = "searchby" size = "1" />
</td><td></td><td></td><td></td>

<td align="center">
	<s:label theme="simple">By Tag</s:label> 
</td>

<td>
	<s:select theme="simple" name= "selectedTagId" headerKey="-1" headerValue="----- Select ----" list = "TagList" listKey="tagName" listValue="tagName" label = "By Tag" id = "searchby" size = "1" />

</td>


<td align="center">
	<s:label theme="simple">By Priority</s:label> 
</td>
<td>
	<s:select theme="simple" name = "byPriority" headerKey="-1" headerValue="--- Select ---" list = "#{1:'1', 2:'2', 3:'3' }" label = "By Priority" id = "searchby" size = "1" align="right"/>
</td>
</tr>
</table>
<br/>
 <s:submit name = "searchIssues" id="searchbutton" value="Search !!"  
          align="center" />
<br/>
<table><tr></tr></table>
<table class="CSSTableGenerator" >

<tr>

<th align="left" colspan="50"><h4><s:label theme="simple">Subject</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Status</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Priority</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Category</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Open Time</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Assigned To</s:label></h4></th>
<th align="left" colspan="50"><h4><s:label theme="simple">Assign ??</s:label></h4></th>
</tr>




<s:iterator value="%{#session.IssueList}" >

<tr>
<td align="left" colspan="50" ><s:property  value="issue_subject"/></td>
<td align="center" colspan="50"><s:property value="issue_status" /></td>

<td align="center" colspan="50">

<s:if test="%{#issue_priority == 0 }">  
  <s:label theme="simple">-</s:label>
 </s:if>  
<s:else>
<s:property  value="issue_priority" />
</s:else>
</td>

<td align="center" ><s:property  value="category" /></td>


<td align="center" colspan="50">

<s:if test="%{#created_datetime== 'NULL'}">  

  <s:label theme="simple">-</s:label>
 </s:if>  
<s:else>  
<s:property value="created_datetime" />
</s:else>
</td>




<td align="center" colspan="50">

<s:property value="assignedto" />

</td>
<td align="left" colspan="50">

<s:if test="%{#assignedto!= null}">  
  <s:label theme="simple">Assigned</s:label>
 </s:if>  
<s:else>  

 <s:url id="url" action="viewIssue.action">
    <s:param name="selected_issue_id" value ="%{issue_id}" ></s:param>
     </s:url>
     <s:a href="%{url}">Assign...</s:a>
 
</s:else>

</td>
</tr>
</s:iterator>
</table>
	

<br/>

</s:form></fieldset>
</div>
<!-- end of content -->

</div> 
<!-- end of content wrapper -->


<div id="footer_wrapper">        
    
<div id="footer">
        
</div>
<!-- end of footer -->

</div>
<!-- end of footer wrapper -->

</body>

</html>

